package com.ssy.lingxi.member.merchant.api.fallback.paas;

import com.ssy.lingxi.common.response.ResponseCode;
import com.ssy.lingxi.common.response.Wrapper;
import com.ssy.lingxi.member.merchant.api.feign.paas.MenuControllerFeign;
import com.ssy.lingxi.member.merchant.api.model.vo.paas.MenuButtonDeleteVO;
import com.ssy.lingxi.member.merchant.api.model.vo.paas.MenuButtonVO;

import javax.validation.Valid;

/**
 * 菜单管理接口Fallback
 * @author 万宁
 * @version 2.0.0
 * @date 2021-06-11
 */
public class MenuControllerFeignFallback implements MenuControllerFeign {
    /**
     * 新增菜单
     *
     * @param addVO 接口参数
     * @return 操作结果
     */
    @Override
    public Wrapper<Void> addMenu(@Valid MenuButtonVO addVO) {
        return Wrapper.fail(ResponseCode.SERVICE_MERCHANT_MEMBER_ERROR);
    }

    /**
     * 修改菜单
     *
     * @param updateVO 接口参数
     * @return 操作结果
     */
    @Override
    public Wrapper<Void> updateMenu(@Valid MenuButtonVO updateVO) {
        return Wrapper.fail(ResponseCode.SERVICE_MERCHANT_MEMBER_ERROR);
    }

    /**
     * 删除菜单及下属菜单，以及按钮
     *
     * @param menuVO 接口参数
     * @return 操作结果
     */
    @Override
    public Wrapper<?> deleteMenu(@Valid MenuButtonDeleteVO menuVO) {
        return Wrapper.fail(ResponseCode.SERVICE_MERCHANT_MEMBER_ERROR);
    }
}
